From ca8e6824eaa711105f4092365792720c9dde026b Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Thu, 18 Jun 2026 19:21:59 +0100 Subject: remove Astro website --- website/src/pages/microlog/[...slug].astro | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 website/src/pages/microlog/[...slug].astro (limited to 'website/src/pages/microlog/[...slug].astro') diff --git a/website/src/pages/microlog/[...slug].astro b/website/src/pages/microlog/[...slug].astro deleted file mode 100644 index 69c94b0..0000000 --- a/website/src/pages/microlog/[...slug].astro +++ /dev/null @@ -1,26 +0,0 @@ ---- -import { type CollectionEntry, getCollection, render } from 'astro:content'; -import MicrologPost from '../../layouts/MicrologPost.astro'; -import { renderGemtextToHtml } from '../../renderGemtextToHtml'; - -export async function getStaticPaths() { - const posts = await getCollection('microlog'); - return posts.map((post) => ({ - params: { slug: post.id }, - props: post, - })); -} -type Props = CollectionEntry<'microlog'>; - -const { id: slug, body } = Astro.props; -const pubDateStr = slug.replaceAll(/\.[0-9]+/g, ''); -const pubDate = new Date(pubDateStr); -if (isNaN(pubDate.valueOf())) { - throw new Error(`Could not construct a valid publication date for microlog post: ${slug}`); -} -const Content = renderGemtextToHtml(body ?? '', pubDateStr); ---- - - - - -- cgit v1.2.3